#define _CRT_SECURE_NO_WARNINGS
#include<stdio.h>
int wore(int n)
{
	int count = 0;
	while (n > 0)
	{
		if (n % 10 == 9)
		{
			count++;
		}
		n /= 10;
	}
	return count;
}
int main()
{
	int sum = 0;
	for (int i = 1; i <= 100; i++)
	{
		sum += wore(i);
	}
	printf("%d\n", sum);
	return 0;
}